package com.lagou.service.impl;

import com.lagou.entity.TbItem;
import com.lagou.mapper.TbItemMapper;
import com.lagou.service.TbItemService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * <p>
 * 商品表 服务实现类
 * </p>
 *
 * @author qjc
 * @since 2021-12-21
 */
@Service
public class TbItemServiceImpl extends ServiceImpl<TbItemMapper, TbItem> implements TbItemService {

    @Resource
    private TbItemMapper itemMapper;

    @Override
    public void decrCountById(Long itemId) {
        itemMapper.decrCountById(itemId);
    }

    @Override
    public void incrCountById(Long itemId, Integer count) {
        itemMapper.incrCountById(itemId, count);
    }
}
